view_set_hport


描述

此函数用来设置给定可视区域的高度。你需要给出可视区域的索引(从0到7)和你所希望设置的高度。


语法:

view_set_hport(view_port, h)


参数:

参数 描述
view_port The view port to target (0 - 7)
h The new height (in pixels)


返回:

Real(实数)


例如:

if view_get_hport(0) != (display_get_height () / 2)
   {
   view_set_hport(0, display_get_height() / 2);
   }

上述代码检查view port[0]的高度,如果他不是展示窗口高度一半,就将前者设为后者的一半。


上一页: Cameras
下一页: view_surface_id
© Copyright YoYo Games Ltd. 2018 All Rights Reserved